package jwlee;
/*
 * 静态变量和静态方法的执行顺序
 */
public class StaticTest {

	private static StaticTest st = new StaticTest();// 3

	private static int count;// 5

	private static int count1 = getInt(0);// 6

	private StaticTest() {
		count++;// 4
		count1++;// 4
		System.out.println("in Constructor: count: " + count + " count1:" + count1);
	}

	public static StaticTest getInstance() {
		return st;// 2
	}

	public static int getInt(int i) {
		System.out.println("getInt: " + i);
		return i;
	}

	public static void main(String[] args) {
		StaticTest st = getInstance();// 1
		System.out.println("count:" + count);
		System.out.println("count1:" + count1);
	}
}
